package test.task;

/**
 * @author liuzhongbing
 * 处理器异常类
 */
public class TaskException extends Exception {
	private static final long serialVersionUID = 1L;
	private static final String COMMAND_NOTFOUND = "无法找到类：";
	private static final String FILE_NOTFOUND = "无法找到文件：";
	private static final String PROPFILE_LOADFAIL = "加载property文件失败：";

	public TaskException(String message) {
		super(message);
	}

	public TaskException(String message, Throwable cause) {
		super(message, cause);
	}
	
	public static TaskException loadPropFileFailed (String filename) {
		return new TaskException(PROPFILE_LOADFAIL + filename);
	}
	
	public static TaskException fileNotFound(String filename) {
		return new TaskException(FILE_NOTFOUND + filename);
	}

	public static TaskException taskNotFound(String clzName) {
		return new TaskException(COMMAND_NOTFOUND + clzName);
	}

}
